<?php
class DeviceInfo extends AppModel
{
    public $name = 'DeviceInfo';
    public $primaryKey = '_id';
    //public $useDbConfig = 'zeus_db';

    public function char_del_all($_db_name, $_usn)
    {
        $this->useDbConfig = $_db_name['log'];

        $params = array('usn' => $_usn);
        if( !$this->deleteall($params) )
            return false;

        return true;
    }

    public function delect_all($_db_name)
    {
        $this->useDbConfig = $_db_name['log'];
        $this->deleteAll(array('_id not' => null));
        return true;
    }
}